#include "drv_timer.h"
#include "main.h"
#include "communication.h"
#include "systemdata.h"
#include "powermanage.h"
#include "protect.h"
#include "workprocess.h"
#include "drv_iwdt.h"
#include "soc.h"
#include "BatMonitor.h"
#include "middlayer.h"
#include "alarm.h"
#include "dvc.h"

int main(void){
	Bsp_Hardware_init();
	loadXgSystemParam();
	powerManageInit();
	bat_monitor_init();
	protectdialog_init();
	alarmdialog_init();
	work_task_init();
	soc_init();
	while(1){
		refresh_timing_task();
		bat_data_update();
		work_task_process();
		external_communicator_process();//外部通信
		iwdt_feed_dog();
	}
}